home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmMyCommon
- Caption = "The MyCommon Program"
- ClientHeight = 4830
- ClientLeft = 1095
- ClientTop = 1350
- ClientWidth = 7365
- Height = 5520
- Icon = MYCOMMON.FRX:0000
- Left = 1035
- LinkTopic = "Form1"
- Picture = MYCOMMON.FRX:0302
- ScaleHeight = 4830
- ScaleWidth = 7365
- Top = 720
- Width = 7485
- Begin CommonDialog CMDialog1
- CancelError = -1 'True
- Left = 3120
- Top = 840
- End
- Begin Menu mnuFile
- Caption = "&File"
- Begin Menu mnuSelect
- Caption = "&Select File..."
- End
- Begin Menu mnuExit
- Caption = "E&xit"
- End
- End
- Option Explicit
- Sub mnuExit_Click ()
- End
- End Sub
- Sub mnuSelect_Click ()
- On Error GoTo OpenError
- ' Set the items of the File Type list box
- CMDialog1.Filter = "All Files (*.*) |*.* |Text Files (*.txt)|*.txt|Doc Files (*.bat)|*.bat"
- ' Set the default File Type to All Files (*.*)
- CMDialog1.FilterIndex = 0
- ' Display the dialog box
- CMDialog1.Action = 1
- ' Display the selected file
- MsgBox "You selected: " + CMDialog1.Filename, 48
- ' Exit this procedure
- Exit Sub
- OpenError:
- ' The user presed the Cancel key of the CMDialog1 control
- MsgBox "No file was selected", 48
- ' Exit this procedure
- Exit Sub
- End Sub
-